#ifndef UDP_H
#define UDP_H

#include <QUdpSocket>
#include <QHostInfo>
class udp: public QObject
{
    Q_OBJECT
public:
    udp(QObject *parent= 0);
public slots:
    void post(const QString &address, const QVariantMap &message);
signals:
void newMessage(const QString &address,const QVariantMap &message);
private slots:
    void readBroadcastDatagram();
private:

    QUdpSocket broadcastSocket;
};

#endif // UDP_H
